I think that I'm going to give up trying to solve the Hat Problem, though I've come pretty far (for background, see
my original description and
its follow-up post). I've now solved the N=5 version (with surprising results!), and gotten a pretty good framework around the problem:(
My final analysis of the Hat Problem, including a reduction to the Minimum Dominating Set problem, source code for a better program to search for solutions, and an optimal strategy for N=5 )